package com.tobby.camel.camelinaction.chapter4.bean;

import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class InvokeWithProcessorSpringTest extends CamelSpringTestSupport {

	@Override
	public AbstractXmlApplicationContext createApplicationContext() {
		return new ClassPathXmlApplicationContext(
				"com/tobby/camel/camelinaction/chapter4/bean/InvokeWithProcessor.xml");
	}

	@Test
	public void testInvokeWithProcessor() {
		String answer = template.requestBody("direct:hello", "Camel in Action",
				String.class);
		assertEquals("Hello Camel in Action", answer);
	}

}
